<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="scrollable" style="height:5000px;overflow: auto;">
        <div style="height: 1000px;background-color: lightgreen;"></div>
    </div>
    <script>
        window.addEventListener('scroll',()=>{
            console.log('window scrollable');
        });
        let scrollable = document.getElementById('scrollable');
        scrollable.addEventListener('scroll',()=>{
            console.log('scrollable');
        });
        window.addEventListener('resize',()=>{
            console.log('window resize');
        });
    </script>
</body>
</html>